package com.forum.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.forum.pojo.ForumArticle;
import com.baomidou.mybatisplus.extension.service.IService;
import com.forum.pojo.ForumArticleAttachment;

import com.forum.pojo.vo.ArticleModify;
import com.forum.pojo.vo.FriendMessageVo;
import com.forum.result.Result;

import java.util.List;

/**
* @author 86152
* @description 针对表【forum_article(文章信息)】的数据库操作Service
* @createDate 2023-01-31 00:42:33
*/
public interface ForumArticleService extends IService<ForumArticle> {


    void postArticle(ForumArticle forumArticle, ForumArticleAttachment forumArticleAttachment, String[] fileUrls);

    void readArticle(String articleId);

    ForumArticle selectByArticleId(String articleId);

    String findNickNameByUserId(Long userId);

    String selectAvatarByUserId(Long userId);

    Page<ForumArticle> findAllByPage(Integer pageNo, Integer pageSize);

    List<ArticleModify> find0BoardEssay(String theme, String findType);
    Page find1BoardEssay(Long pageNum, Long pageSize,String theme,Integer findType);

    Result getPersonArticle(Long userId);

    Result selectBoardEssay(String title, String tag, Integer findType, Long pageNum, Long pageSize, Integer pBoardId);

    int setStar(String articleId, Integer type);

    int setTop(String articleId, Integer type);

    List<FriendMessageVo> selectPerson(String nickName);

    boolean deleteByArticleId(String articleId);

    Integer selectIdentityByUserId(Long userId);
}
